package org.itboys.mobile.entity.mongo;

import org.itboys.commons.utils.random.RandomUtils;
import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.mongodb.morphia.annotations.Entity;

/**
 * Created on 2017/10/31.
 * @author 朱坤涛
 */
@Entity(value = "OrderItem",noClassnameStored = true)
public class OrderItem extends BaseLongIdEntity{

    private String itemNo;//订单ID
    private Long orderId;
    private Long userId;
    private Long productId;//商品ID
    private Long paramId;//规格ID
    private String  productName;//商品名称
    private String productImg;//商品小图
    private int num;//购买的数量
    private Double scale= 0.0;//佣金
    private Double fee;
    private Double totalFee;//最终成交时的金额
    private String elements;//商品规格
    private Integer status = 0;//订单行状态 可能某个订单行交易的商品单独退款 退货之类的 待定业务
    private Integer type;


    private int isScore;

    private int score;

    public OrderItem(){
        this.itemNo =  System.currentTimeMillis()+ RandomUtils.getIntRandom(6);;
    }

    public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {this.itemNo = itemNo;}

    public Long getOrderId() {return orderId;}

    public void setOrderId(Long orderId) {this.orderId = orderId;}

    public Long getUserId() {return userId;}

    public void setUserId(Long userId) {this.userId = userId;}

    public Long getProductId() {return productId;}

    public void setProductId(Long productId) {this.productId = productId;}

    public Long getParamId() {return paramId;}

    public void setParamId(Long paramId) {this.paramId = paramId;}

    public String getProductName() {return productName;}

    public void setProductName(String productName) {this.productName = productName;}

    public String getProductImg() {return productImg;}

    public void setProductImg(String productImg) {this.productImg = productImg;}

    public int getNum() {return num;}

    public void setNum(int num) {this.num = num;}

    public Double getScale() {return scale;}

    public void setScale(Double scale) {this.scale = scale;}

    public Double getFee() {return fee;}

    public void setFee(Double fee) {this.fee = fee;}

    public Double getTotalFee() {return totalFee;}

    public void setTotalFee(Double totalFee) {this.totalFee = totalFee;}

    public String getElements() {return elements;}

    public void setElements(String elements) {this.elements = elements;}

    public Integer getStatus() {return status;}

    public void setStatus(Integer status) {this.status = status;}

    public Integer getType() {return type;}

    public void setType(Integer type) {this.type = type;}

    public int getIsScore() {return isScore;}

    public void setIsScore(int isScore) {this.isScore = isScore;}

    public int getScore() {return score;}

    public void setScore(int score) {this.score = score;}
}
